import request from '@/utils/request'
export function find_setting(token,check){
  return request({
    url: '/video/Video/find_setting',
    method: 'post',
    params: {
      token:token,
      check : check
    }
  })
}
//删除短视频
export function del(token,id){
  return request({
    url: 'video/Video/delete_video_background',
    method: 'post',
    params: {
      token : token, 
      id : id
    }
  })
}

//获取全部短视频列表
export function getlist(token,inp,create_time,page,pagesize){
  console.log(token,inp,create_time,page,pagesize);
  return request({
    url: 'video/Video/select_video_background',
    method: 'post',
    params: { token : token, inp : inp,create_time : create_time,page : page,pagesize : pagesize}
  })
}

//更改短视频审核状态
export function upd(token,id,status){
  return request({
    url: 'video/Video/update_video_status',
    method: 'post',
    params: {
       token : token,
       id : id,
       status : status
    }
  })
}

//获取推荐视频列表
export function getrecommendlist(token,type,page,pagesize){
  console.log(token,type,page,pagesize)
  return request({
    url: 'video/Video/select_recommend_video',
    method: 'post',
    params: { token : token,type : type,page : page,pagesize : pagesize}
  })
}

//增加短视频显示
export function upd_type(token,id,upd_type){
  return request({
    url: 'video/Video/update_type',
    method: 'post',
    params: { token : token,id : id,upd_type : 'show',value : upd_type===true ? 1 : 0}
  })
}

export function upd_type_recommend(token,id,upd_type){
  console.log(upd_type)
  return request({
    url: 'video/Video/update_type',
    method: 'post',
    params: { token : token,id : id,upd_type : 'recommend',value : upd_type ? 1 : 0}
  })
}